<!--
 * @Author: wangze@linkstec.com
 * @Date: 2022-01-14 10:07:54
 * @Function: Please Input Function
-->
<template>
  <div id="app">
    <PageHeader v-if="JSON.stringify($route.meta)!=='{}'&&!$route.meta.independent"/>
    <div :class="{ 'app-content': !($route.meta.independent || $route.meta.fullwidth) }"><router-view v-if="isRouterShow"/></div>
    <IndexFooter v-if="JSON.stringify($route.meta)!=='{}'&&!$route.meta.independent"/>
    <GlobalDialog></GlobalDialog>
  </div>
</template>

<script>
import PageHeader from '@/views/nav/PageHeader.vue';
import IndexFooter from '@/views/footer/IndexFooter';
import GlobalDialog from '@/components/businessComponents/GlobalDialog/GlobalDialog.vue';

export default {
  components: { PageHeader, IndexFooter, GlobalDialog },
  provide () {
    return {
      reload: this.reload
    };
  },
  data () {
    return {
      isRouterShow: true
    };
  },
  computed: {
  },
  watch: {
  },
  methods: {
    async reload () {
      this.isRouterShow = false;
      await this.$nextTick();
      this.isRouterShow = true;
    }
  }
};
</script>

<style>
.app-content{
  width: 90%;
  min-width: 1000px;
  margin: 0 auto;
  padding: 100px 0 20px 0;
}
</style>
